<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>俄罗斯方块 - 经典游戏</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <h1>俄罗斯方块</h1>
        
        <div class="game-wrapper">
            <div class="game-area">
                <canvas id="gameCanvas" width="300" height="600"></canvas>
                
                <div class="game-info">
                    <div class="next-block">
                        <h3>下一个方块</h3>
                        <canvas id="nextCanvas" width="120" height="120"></canvas>
                    </div>
                    
                    <div class="score-section">
                        <div class="score-item">
                            <label>分数</label>
                            <div id="score">0</div>
                        </div>
                        <div class="score-item">
                            <label>消除行数</label>
                            <div id="lines">0</div>
                        </div>
                        <div class="score-item">
                            <label>等级</label>
                            <div id="level">1</div>
                        </div>
                    </div>
                    
                    <div class="controls">
                        <button id="startBtn" class="btn btn-primary">开始游戏</button>
                        <button id="pauseBtn" class="btn btn-secondary" disabled>暂停</button>
                        <button id="resetBtn" class="btn btn-secondary" disabled>重置</button>
                    </div>
                </div>
            </div>
            
            <div class="instructions">
                <h3>操作说明</h3>
                <ul>
                    <li><strong>← →</strong>: 左右移动</li>
                    <li><strong>↑</strong>: 旋转方块</li>
                    <li><strong>↓</strong>: 加速下落</li>
                    <li><strong>空格</strong>: 直接下落</li>
                    <li><strong>P</strong>: 暂停/继续</li>
                </ul>
            </div>
        </div>
        
        <div id="gameOver" class="game-over">
            <div class="game-over-content">
                <h2>游戏结束</h2>
                <p>最终得分: <span id="finalScore">0</span></p>
                <button id="restartBtn" class="btn btn-primary">再来一局</button>
            </div>
        </div>
    </div>
    
    <script src="tetris.js"></script>
    <script src="game.js"></script>
</body>
</html>